feat(ui): DH-23183: Event mapping framework for Element plugins - #1396
Open
mofojed wants to merge 10 commits into
Open
feat(ui): DH-23183: Event mapping framework for Element plugins#1396mofojed wants to merge 10 commits into
mofojed wants to merge 10 commits into
Conversation
Adds a new ui.notification component that displays a system-level notification via the browser Notifications API. Supports description, icon, tag, silent, on_click, and on_close options. Auto-requests permission and falls back to a toast when notifications are denied or unsupported.
Add a ui.tone API that plays notes, chords, and sequences using the browser's Web Audio API, synthesized natively from an oscillator so no audio file is transferred. Supports note names or frequencies, per-note durations, chords (nested lists), rests (None), waveform selection, and gain, following the same event-plumbing pattern as ui.notification. Includes Python and JS unit tests and component docs.
- Update the ElementPlugin to support an eventMapping as well for handling events
This reverts commit 37a1141.
…ions API" This reverts commit af3eb80.
|
ui docs preview (Available for 14 days) |
mofojed
commented
Jul 28, 2026
mofojed
left a comment
Member
Author
There was a problem hiding this comment.
Add something to the docs (and the existing toast docs) about how you must call the emit function from within a deephaven.ui render context.
jnumainville
requested changes
Jul 29, 2026
| name: string, | ||
| eventMap: ReadonlyMap<string, UIEventHandler> = EMPTY_MAP | ||
| ): UIEventHandler | null { | ||
| return eventHandlerMap[name] ?? eventMap.get(name) ?? null; |
Collaborator
There was a problem hiding this comment.
There's some collision risk here. We should probably namespace our events + throw warning if there is an eventMap collision rather than just silently override + have a note of that event namespacing in the docs somewhere.
|
ui docs preview (Available for 14 days) |
margaretkennedy
left a comment
Contributor
There was a problem hiding this comment.
The update to toast.md LGTM
Rename the toast and navigate event names to deephaven.ui.toast and deephaven.ui.navigate. The JS side defines constants for the legacy event names and continues to handle them for older servers. The element plugin template docs now explain the namespacing convention.
|
ui docs preview (Available for 14 days) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.